import request from './request.js'

// 获取公钥
export const getPublicKey = () => request.post('/auth/obtainPK')

//获取短信验证码
export const getSmsCode = (data) => request.post('/resource/sms/code', data)

//腾讯验证码校验
export const captchaCheck = (data) => request.post('/captcha/check', data)

//登录
export const login = (data) => request.post('/auth/login', data)

//注册
export const register = (data) => request.post('/auth/register', data)

//获取用户信息
export const getUserInfo = () => request.get('/system/user/getInfo')

// 根据字典类型查询字典数据信息
export const getDicts = (dictType) => request.get('/system/dict/data/type/' + dictType)

// 新增企业认证
export const addCompanyAuth = (data) => request.post('/business/companyAuth', data)

// 修改企业认证
export const updateCompanyAuth = (data) => request.put('/business/companyAuth', data)

// 初始化企业
export const getCompanyDetail = () => request.get('/business/companyAuth/getDetail')

// 企业认证审核
export const auditCompanyAuth = (data) => request.post('/business/companyAuth/audit', data)

// 地区三级联动
export const linkage = (parentId) => request.get('/business/buArea/linkage?parentId=' + parentId)

// 通知公告列表
export const noticeList = (data) => request.get('/system/notice/list', data)

// 多级字典
export const listMultiDict = (parentId) => request.get('/business/multiDict/list?parentId=' + parentId)

// 查询项目信息列表
export const listProjectInfo = (data) => request.get('/business/project/list', data)

// 查询项目信息详细
export const getProjectInfo = (dictType) => request.get('/business/project/' + dictType)

// 新增项目信息
export const addProjectInfo = (data) => request.post('/business/project', data)

// 新增项目分期
export const addProjectStages = (data) => request.post('/business/project/fission', data)

// 修改项目信息
export const updateProjectInfo = (data) => request.put('/business/project', data)

// 删除项目信息
export const delProjectInfo = (dictType) => request.delete('/business/project/' + dictType)

// 查询在批项目信息列表
export const listApproveProject = (data) => request.get('/business/project/onLotList', data)

// 移入、移出取消库
export const cancelProject = (data) => request.post('/business/project/cancel', data)

// 纳入操作
export const bringInto = (projectId, data) => request.post('/business/project/bringInto?projectId=' + projectId, data)

// 子表单修改
export const subEdit = (data) => request.put('/business/subProject/subEdit', data)

// 子表单审核
export const aubAudit = (entryStatus, data) => request.post('/business/subProject/aubAudit?entryStatus=' + entryStatus,
	data)

// 项目审核
export const auditProject = (data) => request.post('/business/project/audit?baseIds=' + data.baseIds + '&msg=' + data
	.msg + '&state=' + data.state)

// 子表新增
export const subAdd = (projectId, data) => request.post('/business/subProject/subAdd?projectId=' + projectId, data)

// 子表审核
export const subAudit = (data) => request.post('/business/subProject/subAudit?baseIds=' + data.baseIds + '&msg=' + data
	.msg + '&state=' + data.state + '&entryStatus=' + data.entryStatus)

// 获取五评
export const evaluationDetail = (projectId, processDefinitionKey) => request.get(
	'/business/project/evaluationDetail?projectId=' + projectId + '&processDefinitionKey=' + processDefinitionKey)

// 查询企业问题列表
export const questionList = (data) => request.get('/business/question/list', data)

// 查询企业问题详细
export const getQuestion = (dictType) => request.get('/business/question/' + dictType)

// 新增企业问题
export const addQuestion = (data) => request.post('/business/question', data)

// 查询站内信列表
export const myToDoList = () => request.get('/business/statistics/myToDoList')

// 查询项目数量统计
export const projectData = () => request.get('/business/statistics/projectData')

// 年度新开工项目情况分析
export const newlyStarted = () => request.get('/business/statistics/newlyStarted')

// 年度在批项目推进情况分析
export const onLot = () => request.get('/business/statistics/onLot')

// 企业审核列表
export const auditCompanyList = (data) => request.get('/business/companyAuth/list', data)

// 企业审核详情
export const auditCompanyInfo = (dictType) => request.get('/business/companyAuth/' + dictType)

// 项目进度列表
export const getProgressList = (data) => request.get('/business/projectProgress/list', data)

// 查询项目进度详细
export const getProjectProgress = (baseId) => request.get('/business/projectProgress/' + baseId)

// 新增项目进度
export const addProjectProgress = (data) => request.post('/business/projectProgress', data)

//修改项目进度
export const updateProjectProgress = (data) => request.put('/business/projectProgress', data)

// 删除项目进度
export const delProjectProgress = (baseId) => request.delete('/business/projectProgress/' + baseId)

// 进度审核
export const progressAudit = (data) => request.post('/business/projectProgress/audit', data)

// 初始化项目进度数据
export const initProgress = (baseId) => request.get('/business/projectProgress/init?projectId=' + baseId)

// 获取项目五评
export const evaluationInit = (baseId) => request.get('/business/project/evaluationInit?projectId=' + baseId)

// 评价企业问题
export const evaluate = (data) => request.post('/business/question/evaluate', data)
